package cn.bytecollege.user.dao;

import cn.bytecollege.common.dao.BaseDao;
import cn.bytecollege.common.entity.Category;
import cn.bytecollege.common.util.DBHelper;

import java.util.List;

public class CategoryDao extends BaseDao<Category,Integer> {
    private DBHelper helper = null;
    public CategoryDao() {
        helper = new DBHelper();
    }

    /**
     * 查找种类
     * @return
     */
    public List<Category> findCategory(){
        String sql = "SELECT CATEGORY_ID,CATEGORY_NAME FROM CATEGORY";
        return helper.executeQuery(sql,Category.class);
    }
}
